<?php
class Myaccount extends Controller{
	
	function Myaccount()
	{
		parent::Controller();
		$this->freakauth_light->check();
		$this->load->library('CNC_frontend', 'cnc_frontend');
		$this->_container = $this->config->item('CNC_template_dir').'template/container';
	}
	
	function index()
	{
		//$data['sideheading'] = 'My Account';
		$data['sidebar'] = $this->cnc_frontend->get_active_sidebar();
    	
		$data['page'] = $this->config->item('CNC_user_account_view');
        $this->load->vars($data);

		$this->load->view($this->_container);
		
	}
	function profile()
	{
		$data['sideheading'] = 'My Profile';
		$data['sidebar'] = $this->cnc_frontend->get_active_sidebar();
    	$user_id = $this->db_session->userdata('id');
		$data['fal'] = $this->cnc_frontend->profile($user_id);
		//$data['page'] = $this->config->item('CNC_profile_view');
        $this->load->vars($data);

		$this->load->view($this->_container);
	}
 
}